package com.example.file_management.pojo.material;

import com.example.file_management.pojo.material.Task;
//import jakarta.persistence.*;
import lombok.Data;  // Lombok注解：生成getter、setter、toString、equals和hashCode方法
import lombok.NoArgsConstructor; // Lombok注解：生成无参构造函数
import lombok.AllArgsConstructor; // Lombok注解：生成全参构造函数

import java.math.BigDecimal;
import java.time.LocalDateTime;

// TODO：注意需要检查驼峰映射

//@Entity
//@Table(name = "dynamictarget_table")
@Data  // Lombok注解：自动生成getter、setter、toString、equals、hashCode方法
@NoArgsConstructor // Lombok注解：生成无参构造函数
@AllArgsConstructor
public class DynamicTarget {

//    @Id
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer targetID;

//    @ManyToOne
//    @JoinColumn(name = "TaskID", nullable = false)
    private Task task;

//    @Column(nullable = false, length = 255)
    private String targetName;

//    @Column(columnDefinition = "TEXT")
    private String targetDescription;

    private BigDecimal targetValue;

    private BigDecimal achievedValue;

//    @Enumerated(EnumType.STRING)
//    @Column(nullable = false)
    private TargetStatus status;

//    @Column(nullable = false)
    private LocalDateTime updateTime = LocalDateTime.now();

    public enum TargetStatus {
        PENDING, IN_PROGRESS, ACHIEVED, FAILED
    }
}
